package hust.hiepdv.javaproject.view;

import hust.hiepdv.javaproject.model.Ball;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class StartGameFrame extends JFrame {
	
	public static final int WIDTH = 615;
	public static final int HEIGHT = 640;
	private DrawPanel drawPanel;
	
	public StartGameFrame(String title){
		super(title);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setSize(WIDTH, HEIGHT);
		this.setResizable(false);
		
		drawPanel = new DrawPanel();
		this.getContentPane().add(drawPanel);		
	}	
	
	public static void main(String[] args){
		/*SwingUtilities.invokeLater(new Runnable() {			
			@Override
			public void run() {
				StartGameFrame startFrame = new StartGameFrame("Bouncing Ball");
				startFrame.setVisible(true);
				startFrame.drawPanel.startGame();				
			}
		});*/
		StartGameFrame startFrame = new StartGameFrame("Bouncing Ball");
		startFrame.setVisible(true);
		startFrame.drawPanel.startGame();	
	}
}
